package com.lin.mapper;

import com.lin.entity.ImageEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ImageMapper {

    @Select("SELECT * FROM image WHERE alb_id = #{albId}")
    List<ImageEntity> getImage(Integer albId);

    void saveImage(ImageEntity imageEntity);

    void update(ImageEntity imageEntity);

    @Delete("delete from image where id = #{id}")
    void delete(Integer id);
}
